<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="common/head.jsp" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fm" uri="http://www.springframework.org/tags/form"%>

<div class="right">
    <div class="location">
        <strong>你现在所在的位置是:</strong>
        <span>用户管理页面 >> 用户添加页面</span>
    </div>
    <div class="providerAdd">

        <fm:form  method="post" modelAttribute="user" action="/userAddMultiparts" enctype="multipart/form-data">
            <div>
                <label for="userCode">用户编码：</label>
                <fm:input path="userCode"/>
                <font color="red"><fm:errors path="userCode"/></font>
            </div>
            <div>
                <label for="userName">用户名称：</label>
                <fm:input path="userName"/>
                <font color="red"><fm:errors path="userName"/></font>
            </div>

            <div>
                <label for="userPassword">用户密码：</label>
                <fm:password path="userPassword"/>
                <font color="red"><fm:errors path="userPassword"/></font>
            </div>

            <div>
                <label>用户性别：</label>
                <fm:select path="gender">
                    <fm:option value="1" selected="selected">
                        男
                    </fm:option>
                    <fm:option value="2">
                        女
                    </fm:option>
                </fm:select>
                <font color="red"><fm:errors path="gender"/></font>
            </div>

            <div>
                <label for="birthday">出生日期：</label>
                <fm:input path="birthday" type="text" name="birthday"
                       Class="Wdate" readonly="readonly" onclick="WdatePicker();"/>
                <font color="red"><fm:errors path="birthday"/></font>
            </div>

            <div>
                <label for="phone">用户电话：</label>
                <fm:input path="phone" type="text" name="phone"/>
                <font color="red"><fm:errors path="phone"/></font>
            </div>
            <div>
                <label for="address">用户地址：</label>
                <fm:input path="address" name="address"/>
                <font color="red"><fm:errors path="address"/></font>
            </div>
            <div>
                <label for="userRole">角色：</label>
              <fm:select path="userRole">
                  <c:forEach items="${role}" var="role">
                      <fm:option value="${role.id}">${role.roleName}</fm:option>
                  </c:forEach>
              </fm:select>
                <font color="red"><fm:errors path="userRole"/></font>
            </div>
            <div>
                <label >文件上传1：</label>
                <!-- 列出所有的角色分类 -->
                <input type="file" name="multipartFile">
                <font color="red"></font>
            </div>
            <div>
                <label >文件上传2：</label>
                <!-- 列出所有的角色分类 -->
                <input type="file" name="multipartFile">
                <font color="red"></font>
            </div>
            <div>
                <label >文件上传3：</label>
                <!-- 列出所有的角色分类 -->
                <input type="file" name="multipartFile">
                <font color="red"></font>
            </div>
            <div>
                <label >文件上传4：</label>
                <!-- 列出所有的角色分类 -->
                <input type="file" name="multipartFile">
                <font color="red"></font>
            </div>
            <div class="providerAddBtn">
                <input type="submit" name="add" id="add" value="保存">
                <a href="${pageContext.request.contextPath}/user/query"><input type="button" id="back" name="back" value="返回"></a>
            </div>
        </fm:form>
    </div>
</div>
</section>
<%@include file="common/foot.jsp" %>
<%--<script type="text/javascript" src="${pageContext.request.contextPath }/statics/js/useradd.js"></script>--%>
